Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lxml dependency #89

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Add lxml dependency #89

merged 2 commits into from
Feb 21, 2024

Conversation

giotherobot
Copy link
Member

@giotherobot giotherobot commented Feb 20, 2024


📚 Documentation preview 📚: https://jaxsim--89.org.readthedocs.build//89/

@diegoferigo diegoferigo self-requested a review February 20, 2024 15:32
Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@diegoferigo diegoferigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @giotherobot, thanks for the contribution. Can you please add lxml also to environment.yml?

@giotherobot
Copy link
Member Author

There are still some dependencies missing to run python -m jaxsim.mujoco: gz or ign in the path, solved by installing libgz-sim7 as suggested by @flferretti and resolve_robotics_uri_py.

@diegoferigo
Copy link
Member

There are still some dependencies missing to run python -m jaxsim.mujoco: gz or ign in the path, solved by installing libgz-sim7 as suggested by @flferretti and resolve_robotics_uri_py.

Yep, that's right. Those are system dependencies that are expected to be found in the system in the case jaxsim is installed from PyPI. However, in a conda environment, we can specify them as [viz] dependencies.

@flferretti on the long term, we should consider to add them as rod dependencies. Especially in recent Gazebo Sim versions having python bindings of sdformat. Last time I checked, it was not yet part of conda-forge. Maybe now it is.

@flferretti
Copy link
Collaborator

flferretti commented Feb 20, 2024

Yep, that's right. Those are system dependencies that are expected to be found in the system in the case jaxsim is installed from PyPI. However, in a conda environment, we can specify them as [viz] dependencies.

@flferretti on the long term, we should consider to add them as rod dependencies. Especially in recent Gazebo Sim versions having python bindings of sdformat. Last time I checked, it was not yet part of conda-forge. Maybe now it is.

libsdformat on conda-forge provides sdformat14-python

@traversaro
Copy link
Contributor

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there. Probably we can fallback to the gz command if the sdformat python module can't be found?

@flferretti
Copy link
Collaborator

flferretti commented Feb 20, 2024

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there.

@traversaro isn't it python-sdformat?

Probably we can fallback to the gz command if the sdformat python module can't be found?

This looks good, so we are not forced to use gazebo

@diegoferigo
Copy link
Member

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there.

@traversaro isn't it python-sdformat?

Nope, that's a third-party project, not what @traversaro meant.

I guess the tricky aspect is that sdformat is not on PyPI, and I am not sure if it will ever be there. Probably we can fallback to the gz command if the sdformat python module can't be found?

Yep this can be done. When I tried many months ago, what I didn't like of the plain python bindings of sdformat is that I could not manage to get a proper error in stdout if the input URDF or SDF is malformed. Calling gz instead provides clear error messages. Not sure if something has changed since.

@traversaro
Copy link
Contributor

When I tried many months ago, what I didn't like of the plain python bindings of sdformat is that I could not manage to get a proper error in stdout if the input URDF or SDF is malformed. Calling gz instead provides clear error messages. Not sure if something has changed since.

If you have time, it would be useful to report this upstream in https://github.com/gazebosim/sdformat, Python bindings of sdformat and gz libraries in general to not have a lot of users at the moment, so feedback from actual users of the bindings is quite precious for sdformat upstream developers.

@flferretti flferretti merged commit 7239714 into ami-iit:main Feb 21, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants